<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Person { 
          constructor (name, age) {
            this.name = name
            this.age = age
          }
          say () {
            console.log(this.name)
          }
        }

        const chengguo = new Person('chengguo', 26)
        
        class Gril extends Person {
          constructor (name, age, sex) {
            super(name, age)
            this.sex = sex
          } 
        }

        const a = new Gril('chengguo', 26, 'gril')
    </script>
</body>
</html>